package com.itheima.shop.fly_weight_review;

import lombok.Data;
import org.springframework.stereotype.Component;

/**
 * @program: design
 * @description:
 * @author: zhanghz001
 * @create: 2021-02-27 14:42
 **/
@Component
@Data
public class SessionThreadLocalReview {
    private ThreadLocal<SessionShareReview> threadLocal = new ThreadLocal<>();
    
    public SessionShareReview get() {
        return threadLocal.get();
    }
    
    public void set(SessionShareReview sessionShareReview) {
        
        threadLocal.set(sessionShareReview);
    }
    
    public void remove() {
        threadLocal.remove();
    }
}
